#include <ros/ros.h>
#include <iostream>
//#include "~/lcm-1.5.0/lcm/lcm-cpp.hpp"
#include "lcm/lcm-cpp.hpp"
#include "string.h"
#include "exlcm/example_t.hpp"
int main(int argc, char** argv)
{
  ros::init(argc, argv, "image_publisher");
  ros::NodeHandle nh;
 
  lcm::LCM lcm;
  if (!lcm.good())
  {
    return 1;
  }
    exlcm::example_t my_data= {
    	.timestamp = 1123,
    	.position = { 1, 2, 3 

},
    	.orientation = { 1, 0, 0, 10 },
};

    int i;
    for(i = 0; i < 15; i++)
        my_data.ranges[i] = i;
    my_data.enabled = 1;
    while(1)
  	{
        //lcm.publish("LCM_Send", &my_data);
	lcm.publish("LCM_Recv", &my_data);
  	//std::cout << "发送成功!"<<std::endl;
 }
  ros::spinOnce();
}
